-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object endpoint to find internal links for resources #145
Conversation
Add endpoint reference data to support system link generation. Rename inbound/outbound children/parents to focus to/from child/parent terminology to align with SHACL. Rename general_class to base_class. Resolves #101
Remove commented code.
Remove commented code. Fix object tests.
Add endpoint reference data to support system link generation. Rename inbound/outbound children/parents to focus to/from child/parent terminology to align with SHACL. Rename general_class to base_class. Resolves #101
Remove commented code.
Remove commented code. Fix object tests.
…eterministic way on startup and we shouldn't rely on them being deterministic in tests. Both ns1 & ns2 come back in responses for the same link (for a given URI) if the test is run multiple times. Workaround implemented. The test is not intended to test link generation or prefix generation.
…URIs of parents are included in the response, and get annotated, such that labels are available for breadcrumbs. Update spaceprez profile to include dcterms:title for the OAS profile.
Add setting to make ordering optional via ORDER_LISTS_BY_LABEL environment variable, which is on by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, the /profiles
endpoint doesn't return prez:links
Can confirm. I have the same issue as @jamiefeiss. |
I have a fix coming, should be tomorrow. |
Add vann prefixes; correct prefix format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some local testing, I've found two issues:
- For a
skos:Concept
page, theprez:endpointComponentURI
triple seems to be missing:
aarr:chair a skos:Concept ;
dcterms:identifier "aarr:chair"^^prez1:identifier ;
dcterms:provenance "Developed for this Agent to Agent Roles vocabulary"@en ;
rdfs:isDefinedBy <https://data.idnau.org/pid/vocab/aarr> ;
skos:broader aarr:member ;
skos:definition "The presiding officer of an assembly, meeting, committee, or board"@en ;
skos:inScheme <https://data.idnau.org/pid/vocab/aarr> ;
skos:prefLabel "Chair"@en ;
skos:scopeNote "Organisation to Person relations" ;
prez1:link "/v/vocab/vcb:aarr/aarr:chair" .
- For a
skos:Collection
page, a server error occurs:AttributeError: 'list' object has no attribute 'name'
, which points to this line:
prez/prez/services/generate_profiles.py
Line 90 in 4d5a0ba
response = profiles_graph_cache.query(query) |
where the problem seems to be a missing class in the SPARQL query:
VALUES ?class {}
Thanks Jamie I'll take a look.
…On Mon, 28 Aug 2023, 17:41 Jamie Feiss, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
After some local testing, I've found two issues:
1. For a skos:Concept page, the prez:endpointComponentURI triple seems
to be missing:
aarr:chair a skos:Concept ;
dcterms:identifier "aarr:chair"^^prez1:identifier ;
dcterms:provenance "Developed for this Agent to Agent Roles ***@***.*** ;
rdfs:isDefinedBy <https://data.idnau.org/pid/vocab/aarr> ;
skos:broader aarr:member ;
skos:definition "The presiding officer of an assembly, meeting, committee, or ***@***.*** ;
skos:inScheme <https://data.idnau.org/pid/vocab/aarr> ;
skos:prefLabel ***@***.*** ;
skos:scopeNote "Organisation to Person relations" ;
prez1:link "/v/vocab/vcb:aarr/aarr:chair" .
1. For a skos:Collection page, a server error occurs: AttributeError:
'list' object has no attribute 'name', which points to this line:
https://github.com/RDFLib/prez/blob/4d5a0ba0bdcae67323d2373fed655c2aa05e6697/prez/services/generate_profiles.py#L90
where the problem seems to be a missing class in the SPARQL query:
VALUES ?class {}
—
Reply to this email directly, view it on GitHub
<#145 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQUSNXFSDPJY7PKTRKH4A3XXRDTVANCNFSM6AAAAAA3J63ICA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…prez:identifier for providing parent information that can be used in breadcrumbs. Update tests accordingly. Bugfix: Add endpoint name so vocprez endpoint functions correctly.
@jamiefeiss both fixed now - note I've switched to the dcterms:identifier to include parent URL components / their labels. From the updated notes: Add a triple: of the form: |
cheers Co-authored-by: Edmond Chuc <37032744+edmondchuc@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The frontend has everything it needs now after local testing. Thanks David
@edmondchuc I think I've addressed the feedback (just the single suggested change) let me know if I've missed something otherwise will merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Jamie, not sure if these changes caused that issue, in any case I'd like to merge this in before this PR gets any larger. Could you raise an issue separately? I'll address it when making the filter addition to search. |
From dev readme:
High Level Sequence
/object
endpointPrez provides a
/object
endpoint as an endpoint that supplies any information known about a given URI. If an annotatedmediatype is requested, prez will additionally provide all system links for endpoints which can render the object. The
high level sequence for this endpoint is as follows:
these endpoints, specifying any variables that need to be substituted (such as parent URIs).
to construct the system links.
The same functions that are used to do the above have been generally applied to annotated responses. Any annotated response from prez will now:
reference_data/endpoints/
) to find endpoints that can deliver the class(es), and, get a template for these endpoints, specifying any variables that need to be substituted (such as parent URIs).Other minor changes:
reference_data/endpoints
)<focus_uri> prez:endpointComponentURI <uri_used_in_endpoint>
<endpoint_component_uri> dcterms:identifier "{curie_id}"^^prez:identifier
for parent CURIEs in endpoints such that the URIs of parents are included in the response, and get annotated, such that labels are available for breadcrumbs.